<html>
<head>
    <title>Apply for Membership</title>
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" type="text/css" href="https://informatics-apps.systemsbiology.net/ext-js-3.4.0/resources/css/ext-all.css">
    <link rel="stylesheet" type="text/css" href="https://informatics-apps.systemsbiology.net/ext-js-3.4.0/examples/shared/examples.css"/>
    <script type="text/javascript" src="https://informatics-apps.systemsbiology.net/ext-js-3.4.0/adapter/ext/ext-base.js"></script>
    <script type="text/javascript" src="https://informatics-apps.systemsbiology.net/ext-js-3.4.0/ext-all.js"></script>

    <script type="text/javascript" src="/js/utils.js"></script>
    <script type="text/javascript" src="/js/topbar.js"></script>
    <script type="text/javascript" src="/js/widgets.js"></script>
    <link rel="stylesheet" type="text/css" href="/css/stylesheet.css"/>

    <script type="text/javascript">
        var targetUrl = "/addama/memberships/domain/applicants";

        Ext.onReady(function() {
            new org.systemsbiology.addama.js.TopBar({ contentEl: "container_topbar" });

            var moderatedUri = get_parameter("uri");
            if (moderatedUri) {
                targeturl = "/addama/memberships/uris/" + moderatedUri + "/applicants";
            }
        });

        function applyForMembership() {
            Ext.Ajax.request({
                url: targetUrl,
                method: "POST",
                success: function(o) {
                    Ext.get("container_apply").hide();
                    Ext.get("container_success").show();
                }
            });
        }
    </script>
</head>
<body>
<div id="container_topbar" class="topbar"></div>
<div id="container_apply">
    <span id="span_message">Access to this domain is limited to authorized members</span>
    <br/>
    <button onclick="applyForMembership()">Apply for Membership</button>
</div>
<div id="container_success" style="display:none;">
    <span>Application received. Expect notification by email</span>
</div>
</body>
</html>
